package com.bjpowernode.javase.collection.treesetTest;

import java.util.TreeSet;

public class OrderTest {
    public static void main(String[] args) {
        TreeSet<Account> accounts = new TreeSet<>();
        Account account1 = new Account(1,"sxt1",20,0);
        Account account2 = new Account(2,"sxt2",21,0);
        Account account3 = new Account(3,"sxt3",22,0);
        Account account4 = new Account(4,"sxt4",23,1);

        accounts.add(account1);
        accounts.add(account2);
        accounts.add(account3);
        accounts.add(account4);
        accounts.forEach(System.out::println);
    }
}
